<?php
/*
 * @ https://EasyToYou.eu - IonCube v11 Decoder Online
 * @ PHP 7.2 & 7.3
 * @ Decoder version: 1.1.6
 * @ Release: 10/08/2022
 */

// Decoded file for php version 71.
namespace app\massage\model;

class OrderLog extends \app\BaseModel
{
    protected $name = "massage_order_control_log";
    public function dataAdd($data)
    {
        $data["create_time"] = time();
        $res = $this->insert($data);
        return $res;
    }
    public function dataUpdate($dis, $data)
    {
        $res = $this->where($dis)->update($data);
        return $res;
    }
    public function dataList($dis, $page)
    {
        $data = $this->where($dis)->order("status desc,id desc")->paginate($page)->toArray();
        return $data;
    }
    public function dataInfo($dis)
    {
        $data = $this->where($dis)->find();
        return !empty($data) ? $data->toArray() : [];
    }
    public function addLog($order_id, $uniacid, $pay_type, $old_pay_type, $is_admin, $user_id = 0, $type = 1, $mobile = "", $map_type = 0)
    {
        $insert = ["uniacid" => $uniacid, "order_id" => $order_id, "pay_type" => $pay_type, "old_pay_type" => $old_pay_type, "admin_control" => $is_admin, "user_id" => $user_id, "type" => $type, "old_mobile" => $mobile, "map_type" => $map_type];
        $res = $this->dataAdd($insert);
        return $res;
    }
}

?>